package xdu.lz.stage2_design_pattern.chapter17_worker_thread_pattern;

public class WorkerClient {

    public static void main(String[] args) {
        //一个传送带实例 ，给5个工人
        final Channel channel = new Channel(5);

        //模拟搬货到传送带的角色
        for (int i = 0; i < 3; i++) {
            new TransportThread("transporter"+i,channel).start();
        }

        //传送带开始运转，调用的是所有工人的worker线程run
        channel.startWork();


    }
}
